﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FluentAssertions;
using Groundwork.Extensions;

namespace Test.Groundwork.Extensions
{
    [TestClass]
    public class EncodingsTest
    {
        [TestMethod]
        public void TestStringEncodingToBase64()
        {
            string target = "hello world";
            string value = target.EncodeToBase64();
            value.Should().Be("aGVsbG8gd29ybGQ=");
        }

        [TestMethod]
        public void TestStringDecodeFromBase64()
        {
            string target = "aGVsbG8gd29ybGQ=";
            string value = target.DecodeFromBase64();
            value.Should().Be("hello world");
        }
    }
}
